<%--
  Created by IntelliJ IDEA.
  User: macbookpro
  Date: 2023/12/9
  Time: 17:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>作者空间</title>
    <link rel="stylesheet" href="/css/Dou.css">
    <link rel="stylesheet" href="/css/swiper-bundle.min.css">
    <link rel="shortcut icon" href="https://static.arkread.com/ark/pics/favicon/favicon.ba37640e.ico" type="image/x-icon"/>
    <link rel="mask-icon" href="https://static.arkread.com/ark/pics/favicon/safari-mask-icon.714e3ee0.svg" color="#5795aa"/>
    <link rel="stylesheet" href="/css/authorIndex.css">
</head>
<body>
<%
    String username = (String) request.getSession().getAttribute("username");
%>>
<div class="wrapper layout-v3">
    <!-- 头部 -->
    <div id="header-container">
        <header id="header-compact-v3" class="pre-rendered-header should-stick">
            <div class="header-inner">
                <a href="#" title="豆瓣阅读" class="site-logo"></a>
                <nav class="func-nav">
                    <ul>
                        <li>
                            <button title="分类" class="nav-category fill-current-color" style="height: 30px;">
                                <svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" viewBox="0 0 10 7">
                                    <path fill="#a6a6a6"
                                          d="M0 0h10v.7H0zm0 2.1h10v.7H0zm0 2.1h10v.7H0zm0 2.1h10V7H0z"></path>
                                </svg><span class="text" style="font-size:14px">分类</span>
                            </button>
                        </li>
                        <li>
                            <button id="btn" onclick="toggle()" title="搜索" class="nav-category fill-current-color" style="height: 30px;">
                                <svg xmlns="http://www.w3.org/2000/svg" width="14" viewBox="0 0 14 14">
                                    <path fill="#a6a6a6" `
                                          d="M14 12.83l-2.19-2.19a6.61 6.61 0 10-1.17 1.17L12.83 14zM2.5 10.7a5.8 5.8 0 018.2-8.2 5.8 5.8 0 01-8.2 8.2z"></path>
                                </svg><span class="text" style="font-size:14px">搜索</span>
                            </button>
                        </li>
                    </ul>

                    <div class="sousuo" id="content" style="display:none;">

                        <form action="#" class="search-form">
                            <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"
                                 class="search-icon">
                                <circle cx="8.486" cy="8.486" r="7.736" stroke="#35393C" stroke-width="1.8">

                                </circle>
                                <path fill="#fff" stroke-width="1.2" stroke="#35393C"
                                      d="M4.603 4.603a5.491 5.491 0 000 7.765"></path>
                                <path fill="#A6A6A6" stroke-width="1.2" stroke="#35393C"
                                      d="M13.685 14.39l.705-.705 2.55 2.55a.498.498 0 01-.704.706l-2.55-2.55z"></path>
                            </svg>


                            <input type="text" name="q" maxlength="60" autocomplete="off"
                                   placeholder="原创作品 / 同人文 / 电子书 / 作者 / 译者 / 出版社">

                            <button class="btn-search" type="submit">搜索</button>
                        </form>

                        <!-- 热搜 和历史记录 -->

                        <div class="re" >
                            <div class="lis">
                                <div>
                                    <div>
                                        搜索历史 <span>清除</span>
                                    </div>
                                    <div style="width: 100%; height: 200px;margin-left: 140px;">
                                        <div class="k strs">
                                            <strong> 吊桥效应</strong>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="lis">
                                <div>
                                    <div>
                                        热门搜索
                                    </div>
                                    <div style="width: 100%; height: 200px;margin-left: 140px;">
                                        <div class="k">
                                            <strong class="iii"> 食得咸鱼低得喝</strong>
                                            <strong class="kkk"> 在傍晚回家</strong>
                                        </div>
                                        <div class="k stt">
                                            <strong class="kk"> 大城小爱</strong>
                                            <strong class="sttt"> 多雨之地</strong>
                                        </div>
                                        <div class="k strs">
                                            <strong> 白日谎言</strong>
                                            <strong> 日偏食</strong>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="lis">
                                <div>
                                    <div>
                                        为你推荐
                                    </div>
                                    <div style="width: 100%; height: 200px;margin-left: 140px;">
                                        <div class="k strs">
                                            <strong> 6部热门原创小说现时半价</strong>
                                        </div>
                                        <div class="k strs">
                                            <strong> 2022 年度榜单</strong>
                                        </div>
                                        <div class="k strs">
                                            <strong> 第五届长篇拉力赛获奖名单公布</strong>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </nav>
                <!-- 头部中间部分 -->
                <div class="site-nav-container">
                    <nav class="site-nav site-nav-normal" id="myElement">
                        <ul class="nav-list">
                            <li class="nav-item-original">
                                <a href="#" style="height: 30px;">原创</a>
                            </li>

                            <li class="nav-item-chart">
                                <a href="#" style="height: 30px;">排行</a>
                            </li>

                            <li class="nav-item-ebook">
                                <a href="#" style="height: 30px;">出版</a>
                            </li>

                            <li class="nav-item-ebook">
                                <a href="#" style="height: 30px;">会员</a>
                            </li>

                            <li class="nav-item-ebook">
                                <a href="#" style="height: 30px;">APP</a>
                            </li>
                        </ul>
                    </nav>
                </div>

                <div id="nav-submit" class="nav-submit">
                    <a href="#" class="lnk-start-publish fill-current-color" >成为作者</a>
                </div>

                <nav class="site-nav-right">
                    <ul>
                        <li class="nav-bookshelf">
                            <a href="#" title="书架" aria-label="书架" class="require-login" style="height: 30px;">
                                <svg xmlns="http://www.w3.org/2000/svg" width="24" viewBox="0 0 24 24"
                                     class="fill-current-color">
                                    <path fill="#a6a6a6"
                                          d="M13.9 5.223l3.14 12.1a.23.23 0 00.284.165l2.332-.645a.233.233 0 00.162-.28l-3.14-12.1a.23.23 0 00-.284-.166l-2.332.645a.233.233 0 00-.162.28zM8.5 5h-3v12h3zm1 12h3V3h-3v14zm4-9.327V14.5h1.77zm0-3.57a1.212 1.212 0 01.293-.125l2.33-.645a1.232 1.232 0 011.516.86v.018l3.136 12.1a1.23 1.23 0 01-.863 1.5l-2.33.647a1.232 1.232 0 01-1.516-.86v-.018l-.537-2.08H13.5V17a1 1 0 01-1 1h-3a1 1 0 01-.5-.134 1 1 0 01-.5.134h-3a1 1 0 01-1-1v-1.5H1.822a.23.23 0 00-.23.227l-.074 5.04a.23.23 0 00.23.233h20.506a.23.23 0 00.228-.234l-.074-5.04a.23.23 0 00-.23-.226h-1.59l-.268-1h1.858a1.23 1.23 0 011.23 1.213l.074 5.038A1.23 1.23 0 0122.27 22H1.75a1.23 1.23 0 01-1.232-1.23v-.02l.074-5.037a1.23 1.23 0 011.23-1.213H4.5V5a1 1 0 011-1h3V3a1 1 0 011-1h3a1 1 0 011 1z"></path>
                                </svg>
                            </a>
                        </li>
                    </ul>
                </nav>

                <!-- 第四部分 -->
                <div class="user-info" id="user-info">
                    <div class="login-buttons">
                        <a href="#" data-size="sx" class="btn-contained login">
                            <span class="text">登录 / 注册</span>
                        </a>
                    </div>
                </div>
            </div>
        </header>

        <div class="main" style="margin-top: 100px;">
            <div class="people-section-wrapper">
                <div class="people-section col-media">
                    <div class="actions-wrapper cm-right">
                        <div class="follow-actions">
                            <ul class="followed-info"></ul>
                            <a href="uploadBook.jsp"><button class="btn btn-primary btn-follow follow-action-label">发布图书</button></a>
                        </div>
                    </div>
                    <div class="people-meta col-media cm-body">
                        <div class="cm-left">
                            <a href="#" class="lnk-avatar">
                                <div class="avatar avatar48">
                                    <i class="icon-author-stamp"></i>
                                    <div class="inner">
                                        <img src="https://img3.doubanio.com/icon/up138652042-2.jpg?company_token=kX69T8w1wyOE-arkwebview" alt="" style="width: 48px;height:48px">
                                    </div>
                                </div>
                            </a>
                        </div>
                        <div class="cm-body">
                            <div class="hd">
                                <div class="people-name">大姑娘浪</div>
                            </div>
                            <div class="bd">
                                <span class="join-time" style="font-size: 12px;">2015-12-06加入</span>
                            </div>
                        </div>
                        <div class="special-icons" style="padding-left:10px">
                            <i class="special-icon icon-author"></i>
                        </div>
                    </div>
                </div>
                <div class="author-intro-section">
                    <div class="equal-height-layout-wrapper">
                        <div class="intro-wrapper">
                            <div class="author-name">豆瓣阅读作者，大波浪</div>
                            <p class="first-onsale-data">2021-03-12发表第一篇作品</p>
                            <p>
                                <span class="intro-value">以我之文，起你之性</span>
                            </p>
                        </div>
                        <div class="quote-wrapper">
                            <blockquote class="quote">
                                <p>
                                    <span class="quote-value">在一个崩坏的语言环境里，容我保持对语言的敬意</span>
                                </p>
                            </blockquote>
                        </div>
                    </div>
                </div>
            </div>
            <div class="content-section">
                <div class="aside col col4">
                    <section class="following-agents">
                        <div class="hd lined">
                            <h3>大姑娘浪关注的作者</h3>
                        </div>
                        <ul class="bd">
                            <li class="item col-media">
                                <div class="cm-right">
                                    <a href="#" class="lnk-avatar">
                                        <div class="avatar avatar48">
                                            <div class="inner">
                                                <img src="https://img9.doubanio.com/icon/up2012686-4.jpg?company_token=kX69T8w1wyOE-arkwebview" alt="" style="width: 48px;height:48px">
                                            </div>
                                        </div>
                                    </a>
                                </div>
                                <div class="info cm-body">
                                    <div class="name"></div>
                                    <div class="author-tags">
                                        <a href="#">治愈</a>
                                        <a href="#">青春</a>
                                    </div>
                                    <div class="followed-number">
                                        15000人关注
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </section>
                    <section class="share-buttons-section">

                    </section>
                </div>
                <div class="artical col col9">
                    <div class="published-items-widget">
                        <section class="published-items">
                            <div class="hd lined">
                                <h3>
                                    <span>我发布的作品</span>
                                    <span class="total-number">10</span>
                                </h3>
                            </div>
                            <div class="bd">
                                <ul class="list-lined ebook-list column-list author-published-items" style="padding: 0;">
                                    <li class="item store-item">
                                        <div class="cover mini-shadow-cover">
                                            <a href="#" class="pic">
                                                <img src="https://pic.arkread.com/cover/column/f/62654733.1661140527.jpg!cover_default.jpg" alt="" style="width: 110px;height:135px">
                                            </a>
                                        </div>
                                        <div class="info">
                                            <div class="title">
                                                <a href="#">沪上烟火（二部）</a>
                                                <span class="label-category">连载中</span>
                                            </div>
                                            <div class="tag">
                                                <i class="icon-tag"></i>
                                                <span>·</span>
                                                <a href="#">家庭故事</a>
                                                <span>·</span>
                                                <a href="#">正剧</a>
                                                <span>·</span>
                                                <a href="#">人间烟火</a>
                                            </div>
                                            <div class="column-stats">
                                            <span class="subscribed-number">
                                                16442人加入书架
                                            </span>
                                            </div>
                                            <div class="author-reco">
                                                <div class="blockquote-wrapper">
                                                    <blockquote class="abstract-reco" style="margin-left: 0;">
                                                        <strong>自述：</strong>
                                                        <span>接替上部</span>
                                                    </blockquote>
                                                </div>
                                                <button type="button" class="btn btn-primary btn-xs" style="border-radius: 5px;background:#389eac">修改</button>
                                                <button type="button" class="btn btn-primary btn-xs" style="border-radius: 5px;background:#6495ed">上传</button>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            <!-- <div class="ft">
                                <div class="more-link">
                                    <a href="#">查看全部10部作品</a>
                                </div>
                            </div> -->
                        </section>
                    </div>
                </div>
            </div>
        </div>
        <div class="di" style="margin-top:100px">
            <div class="newdi">
                <div class="onedi" style="width: 60%;">
                    <div class="txet-onedi" style="margin-top: 8px;">© 2014 - 2023 read.douban.com, all rights reserved.
                        北京方舟阅读科技有限公司 </div>
                    <div class="txet-onedi">京ICP备11027288号 网络视听许可证0110418号 新出发京批字第直160030号 文网文[2009]267号 (总)网出证(京)字129号
                    </div>
                </div>
                <div class="onedi xxx" style="width: 30%;">
                    <span>联系我们A</span>
                    <span>帮助中心A</span>
                    <span>官网微博A</span>
                    <span>移动客户端A</span>
                    <span>来这里工作</span>
                </div>
                <div class="onedi logos">
                    <img src="https://static.arkread.com/ark/pics/logo/white-s.e299074d.png" alt="" style="width: 100px;height:20px">
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(document).ready(function (){
        let username='<%=username%>';

    })
    $(document).ready(function (){
        let username='<%=username%>';
        console.log(username);
        if (username==='null') {//当前尚未登录
            console.log('success2');
            $('#user-info').empty();
            $('#user-info').append('<div class="login-buttons">'+'<a href="userLogin.jsp" data-size="sx" class="btn-contained login">'+
                '<span class="text">登录 / 注册</span></a> </div>')
        }else{//已经登陆.带着登陆信息到后端加载用户头像
            console.log('success1');
            $.ajax({
                type:"GET",
                url:"/load/Image",
                data:{username:username},
                success:function (data) {
                    $('#user-info').empty();
                    $('#nav-submit').empty();
                    for(var i=0;i<data.length;i++) {
                        $('#user-info').append('<div class="nav-user more-active">' +
                            '<a href="#" class="avatar">' +
                            '<img src="'+data[i].userAvatar+'" alt="">'+
                            '</a>' +
                            '<div class="drop-down-list">' +
                            '<a href="/myIndex/message?username='+username+'">' +
                            '<span class="text">个人主页</span>' +
                            '</a>' +
                            '<a href="#">' +
                            '<span class="text">退出登陆</span>' +
                            '</a>' +
                            '</div>' +
                            '</div>')
                        if(data[i].identify===-1){//不是作者
                            $('#nav-submit').append(` <a href="transtition.jsp" class="lnk-start-publish fill-current-color">成为作者</a>`)
                        }else{
                            $('#nav-submit').append(` <a href="authorIndex.jsp" class="lnk-start-publish fill-current-color">作者空间</a>`)
                        }

                    }
                },
                error:function (error){
                    console.log(error);
                }
            })
        }
    })
</script>
</body>

</html>